// ==UserScript==
// @name           phpBB Add Common Nav Links
// @description    Add navigation links to additional pages
// @include        *fantasybaseballcafe.com/forum*
// @author         Glenn Carr (glenn at glenncarr dot com)
// $LastChangedRevision: 152 $
// $LastChangedDate: 2007-06-25 16:13:52 +0000 (Mon, 25 Jun 2007) $
// ==/UserScript==
/*
   Usage: You'll need to add your boards to the list of URLs @included by this script
*/

(function () {

PRO_addStyle( 'select, input { font-size: 11px }' );

var uls = document.getElementsByTagName( 'ul' );
for ( var i = 0; i < uls.length; i++ )
{
    var ul = uls[ i ];
    if ( !/^linklist$/.test( ul.className ) )
        continue;
        
    var li = ul.getElementsByTagName( 'li' )[ 0 ];
    if ( !/href="\.\/ucp\.php"/i.test( li.innerHTML ) && !/href="\.\/index\.php"/i.test( li.innerHTML ) )
        continue;

    li.innerHTML = li.innerHTML.replace( /\>view your posts\</i, '>Yours<' );

    if ( !/search.php\?search_id=egosearch/i.test( li.innerHTML ) )
        li.innerHTML += ' &bull; <a href="search.php?search_id=egosearch">Yours</a>';
    if ( !/search\.php\?search_id=newposts/i.test( li.innerHTML ) )
        li.innerHTML += ' &bull; <a href="search.php?search_id=newposts">New</a>'
    if ( !/search\.php\?search_id=active_topics/i.test( li.innerHTML ) )
        li.innerHTML += ' &bull; <a href="search.php?search_id=active_topics">Active</a>'
    if ( !/ucp.php\?i=main&mode=subscribed/i.test( li.innerHTML ) )
        li.innerHTML += ' &bull; <a href="ucp.php?i=main&mode=subscribed">Subscriptions</a>';
    if ( !/ucp.php\?i=main&mode=subscribed/i.test( li.innerHTML ) )
        li.innerHTML += ' &bull; <a href="ucp.php?i=main&mode=bookmarks">Bookmarks</a>';
}
})();
